package com.itheima.ClassTest;

import com.itheima.domain.Student1;

import java.util.Scanner;

public class split {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        System.out.println("请输入学生信息:");
        String stu = sc.nextLine();
        String[] ss = stu.split(",");
        Student1 s = new Student1(ss[0],ss[1]);
        System.out.println(s.getName()+"---"+s.getAge());
    }
}
